package com.heima.search.config;

import com.heima.search.interceptor.AppInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author WSJ
 * @Date 2022-03-12-14:39
 * @Version 1.0 （版本号）
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {


    /**
     * 配置拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AppInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/login/in");
    }
}
